{
  lib,
  pkgs,
  config,
  ...
}:
{
  options.flakeDeclared.desktop.environment = lib.mkOption {
    type = with lib.types; nullOr (enum [ "plasma6" ]);
  };
  config = lib.mkIf (config.flakeDeclared.desktop.environment == "plasma6") {
    services = {
      xserver.enable = true; # Still needed for correct scaling.
      displayManager.sddm = {
        enable = true;
        autoNumlock = true;
        wayland.enable = true;
      };
      desktopManager.plasma6.enable = true;
    };
    programs.kdeconnect.enable = true;
    environment.systemPackages = with pkgs; [
      okteta
    ];
  };
}
